<include file="application/home/view/public/header.html"/>
      <!-- /.aside -->
      <section id="content">
        <section class="vbox">
          <section class="scrollable padder">
             <header class="header bg-light bg-gradient b-b">
            <p>充值</p>
          </header>
          <form class="form-horizontal" data-validate="parsley">
                <section class="panel panel-default">
                    <div class="panel-body">
                    <header class="panel-heading"> <strong>充值页面</strong> </header>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">充值方式：</label>
                        <div class="col-lg-4">
                          	<select id="type" name='type' class="form-control">
								<option value="1" data-name="银行卡" data-jifen="{$config.bank_card}">银行卡</option>
								<option value="2" data-name="支付宝" data-jifen="{$config.zhifubao}">支付宝</option>
							</select>
                        </div>
                      </div>
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">积分种类：</label>
                        <div class="col-lg-4">
                          	<select id="account_type" name='account_type' class="form-control">
								<option value="1" data-name="报单币" >报单币</option>
								<option value="3" data-name="复投币">复投币</option>
							</select>
                        </div>
                      </div>
                      
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label" id="ass">银行卡:</label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control" name="assect" value="{$config.bank_card}" disabled>
                        </div>
                      </div>
                      <div id="kh">
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">开户行:</label>
                        <div class="col-lg-4">
                          	<input type="text" class="form-control" value="{$config.kaihuhang}" disabled>
                        </div>
                      </div>
                      </div>
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label" id="ass">金额:</label>
                        <div class="col-lg-4">
                          <input type="text" id="money" name="money" class="form-control" placeholder="">
                        </div>
                      </div>

					 <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-md-3 control-label" style="color:#FF0000">请确认预留信息与实际打款账户*</label>
                      </div>
                    </div>
                    <footer class="panel-footer text-right bg-light lter">
                      <button type="button" class="btn btn-success btn-s-xs" onclick="sub()" >提 交</button>
                    </footer>
                    <header class="panel-heading">提现记录</header>
		            <div class="table-responsive">
		                <table class="table table-striped b-t b-light text-sm">
		                  <thead>
		                    <tr>
		                      	<th>类型</th>
								<th>金额</th>
								<th>积分种类</th>
	                            <th>时间</th>
	                            <th>状态</th>
		                    </tr>
		                  </thead>
		                  <tbody>
		                    <foreach name="list" item="v">
							  <tr>
							  	<td>充值</td>
								<td>{$v.num}</td>
								<td>{$v.account_type}</td>
								<td>{$v.add_time|date='Y-m-d H:i:s',###}</td>
								<td>
									<eq name="v.status" value='0'>
									 	等待审核

								 </eq>
								 <eq name="v.status" value='1'>
									 	充值成功
									 
								 </eq>
								 <eq name="v.status" value='-1'>
									 	未通过
									 
								 </eq>
								</td>	
							  </tr>
							</foreach>
		                  </tbody>
		                </table>
		              </div>
		              <footer class="panel-footer">
		                <div class="row">
		                  <div class="col-sm-4 hidden-xs">
		                  <!--  这里不可以删掉 -->
		                  </div>
		                  <div class="col-sm-4 text-center">  </div>
		                  <div class="col-sm-4 text-right text-center-xs">
		                    <ul class="pagination pagination-sm m-t-none m-b-none">
		                      <li>{$page}</li>
		                    </ul>
		                  </div>
		                </div>
		              </footer>
                  </section>
          </form>
          </section>
        </section>
        <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a> </section>
      <aside class="bg-light lter b-l aside-md hide" id="notes">
        <div class="wrapper">Notification</div>
      </aside>
    </section>
  </section>
</section>
<script src="__PUBLIC__/home/js/app.v2.js"></script> <!-- Bootstrap --> <!-- App --> <script src="__PUBLIC__/home/js/charts/easypiechart/jquery.easy-pie-chart.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/sparkline/jquery.sparkline.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.tooltip.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.resize.js" cache="false"></script> <script src="js/charts/flot/jquery.flot.grow.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/bootstrap_calendar.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/sortable/jquery.sortable.js" cache="false"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
</body>
</html>
 <script type="text/javascript">
	/***************************************选择币种  然后资产随着改变************************************/
	$("#type").change(function(){
		var t_name = $('#type option:selected').attr("data-name");
		var t_jifen = $('#type option:selected').attr("data-jifen");
		$('#ass').html(t_name+': <span class="mandatory"></span>');
	 	$("[name='assect']").val(t_jifen);
	});
	var cnt = true;
	function sub(){
		if(cnt){
			cnt = false;
			var type=$('#type option:selected').val();
			if(type == ""){
				layer.msg("请选择充值方式");return;
			}
			var money =$('#money').val();
			if(money == ""){
				layer.msg("请输入充值金额");return;
			}
			var account_type = $('#account_type').val();
				if(account_type == ""){
				layer.msg("请输入积分类型");return;
			}
			var url="{:U('Money/chongzhisave')}";
			$.post(url,{'type':type,'money':money,'account_type':account_type},function(data){
				layer.msg(data.info);
				if(data.status==1){
					setTimeout(function () { 
			      	 	window.location.reload();
			    	}, 2000);
				}
			});
		}
	}
</script>
<script type="text/javascript">
		$('#type').change(function(){
			var type = $('#type').val();
			if(type== 1){
				$('#kh').css('display','block');
			}
			if(type== 2){
				$('#kh').css('display','none');
			}
		});
			
</script>